CMAKE_MINIMUM_REQUIRED(VERSION 3.0...3.20)
PROJECT(gear-lib)

INCLUDE_DIRECTORIES(. ${POSIX_INCLUDE_DIR} ${GEVENT_INCLUDE_DIR} ${DARRAY_INCLUDE_DIR} ${THREAD_INCLUDE_DIR})
AUX_SOURCE_DIRECTORY(. SOURCE_FILES)

IF (DEFINED OS_LINUX OR DEFINED ENV_MINGW)
set(CMAKE_C_FLAGS "-DOS_LINUX")
ELSEIF (DEFINED OS_WINDOWS)
set(CMAKE_C_FLAGS "-DOS_WINDOWS")
ENDIF ()
ADD_LIBRARY(sock ${SOURCE_FILES})
